package com.blank.shop.nacos.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Profile;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <br/>Date 2021/8/29
 * <br/>Time 16:08:48
 *
 * @author _blank
 */
@Profile(value = {"dev", "test", "prod"})
@RefreshScope
@RestController
public class ServiceConfigurationController {

    @Value("${sysout}")
    private String text;

    @GetMapping(path = {"print-nacos-properties"})
    public ResponseEntity<String> printNacosProperties() {
        return ResponseEntity.ok("nacos存储的内容是：" + this.text);
    }

}
